<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>收件箱</title>
		<link type="text/css" rel="stylesheet" href="../jquery-easyui-1.4.2/themes/default/easyui.css">
		<link type="text/css" rel="stylesheet" href="../jquery-easyui-1.4.2/themes/icon.css">
		<script type="text/javascript" src="../js/jquery-2.1.1.min.js"></script>
		<script type="text/javascript" src="../jquery-easyui-1.4.2/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../jquery-easyui-1.4.2/locale/easyui-lang-zh_CN.js"></script>
		
		<style type="text/css">
			#outBox_span{
				font-weight: bold;
				font-size: 14px;
				cursor:default;
				text-decoration: none;
			}
			#div_query{
				margin:20px 15px 15px;
			}
		</style>
		<script type="text/javascript">
			function login(){
				var userName = $("#userName").combobox("getText");
				var userPass = $("#userPass").combobox("getText");
				$.post("../email/userLogin.do",{
					userName:userName,
					userPass:userPass
				},function(data){
					
					if(data != null){
						if(data.userName == userName && data.userPass == userPass){
							alert("登录成功");
							window.location.href="message.jsp";
						}else{
							alert("登录失败，请您检查账号和密码！")
						}
					}else{
						alert("登录失败，请您检查账号和密码！")
					}
				},"json")
			}
		</script>
	</head>
	<body class="easyui-layout" style="margin: auto;">
		<div data-options="region:'center'">
			<div id="div_query">
				<span>账号:</span>
				<input class="easyui-textbox" id="userName" style="width:15%">
				<br/>
				<span>密码:</span>
				<input class="easyui-textbox" id="userPass" style="width:15%">
				<a href="javascript:login();" class="easyui-linkbutton">登录</a>
			</div>
		</div>
	</body>
</html>
